﻿<%@ Control Language="C#" ClassName="Disbursement" Inherits="Dimok.Web.UI.UserControlEx" %>
<script runat="server">
int _LoanID;
[Bindable(true)]
public int LoanID { get { return _LoanID; } set { _LoanID = value; } }
</script>

<STYLE>
.Disbursement TD{
	border:0px white none;
	color: black;
	font-weight:bold;
	font-size: 14pt;
	font-family: tahoma;
	}
</STYLE>

<center class="Disbursement" style="margin-top:20px">
<TABLE align="center" width="80%"><TR>
	<TD><IMG src="/images/FQuest/logo.gif" name=imgLogo ></TD>
	<TD width="100%" align="center" nowrap>
	Affiliated Financial Corporation<BR/>
	<%=ConfigLocal.FQuest.Address.Street%><br />
	<%=ConfigLocal.FQuest.Address.CityStateZip%><br />
	Phone:<%=ConfigLocal.FQuest.Address.Phone%> Fax:<%=ConfigLocal.FQuest.Address.Fax%>
	
	</TD>
</TR></TABLE>
<P></P>
<asp:FormView DataSourceID="dsDisb" runat="server"><ItemTemplate>
<TABLE border="0" width="100%" BORDERCOLOR="black">
<colgroup span="3" Align="left"></colgroup>
<TR><TH colspan="10" style="TEXT-ALIGN: center"><HR></TH></TR>
<TR><TD nowrap>DATE:</TD><TD width="100%"><%#Eval("DocumentDate","{0:d}")%></TD></TR>
<TR><TD nowrap>CONTRACT HOLDER:</TD><TD><%#Eval("ContractHolder")%></TD></TR>
<TR><TD nowrap>CUSTOMER NAME:</TD>
		<TD><UI:DataBoundText DataSourceID="dsBorrower" DataTextField="FirstName" runat="server" />
				<UI:DataBoundText DataSourceID="dsBorrower" DataTextField="LastName" runat="server" />
		</TD>
</TR>
<TR><TD nowrap>ACCOUNT NUMBER:</TD><TD><%#Eval("LoanID")%></TD></TR>
</TABLE>
<HR>
<CENTER><div style="margin:15px 0px 15px 0px">BREAKDOWN OF FUNDS DISBURSED</div>
<TABLE border="0">
<col Align="left" />
<TR><TD nowrap>Principle Balance:</TD>
		<TD></TD>
		<TD colspan="1" align="right"><%#Eval("AmountFinanced", "{0:c}")%></TD></TR>
<TR RunAt="server" visible='<%#double.Parse(Eval("TrackerReward")+"")>0%>'><TD nowrap>Tracker Reward:</TD>
		<TD></TD>
		<TD colspan="1" align="right"><%#Eval("TrackerReward", "{0:c}")%></TD></TR>
<TR><TD nowrap>Less Reserve and Fees:</TD>
<TR><TD nowrap style="padding-left:25px">Reserve:</TD>
		<TD></TD>
		<TD colspan="1" align="right"><%#Eval("Reserve", "{0:c}")%></TD></TR>
<TR><TD nowrap style="padding-left:25px">Acquisition Fee:</TD>
		<TD></TD>
		<TD colspan="1" align="right"><%#Eval("Fee", "{0:c}")%></TR>
<!-- Exceptions -->
<TR><TD nowrap style="padding-left:25px">Exception Fees:</TD>
<TR><TD nowrap style="padding-left:50px;padding-right:30px" Align="right">Overage:</TD>
		<TD colspan="1" align="right"><UI:LiteralEx Text='<%#Eval("OverageFee", "{0:c}")%>' HideIfZero='<%#Eval("OverageFee")%>' runat="server" /></TD></TR>
<TR><TD nowrap style="padding-left:50px;padding-right:30px" Align="right">APR:</TD>
		<TD colspan="1" align="right"><UI:LiteralEx Text='<%#Eval("APRFee", "{0:c}")%>' HideIfZero='<%#Eval("APRFee")%>' runat="server" /></TD></TR>
</TR>
<TR><TD nowrap style="padding-left:50px;padding-right:30px" align="right">Term:</TD>
		<TD align="right"></TD></TR>
<TR><TD nowrap style="padding-left:50px;padding-right:30px" align="right"><%#Eval("OtherFeeName")%>:</TD>
		<TD colspan="1" align="right"><UI:LiteralEx runat="server" Text='<%#Eval("OtherFeeValue", "{0:c}")%>' HideIfZero='<%#Eval("OtherFeeValue")%>' /></TD></TR>
<TR><TD nowrap align="right" style="padding-right:30px">Total Exception Fees:</TD>
		<TD></TD>
		<TD align="right"><UI:LiteralEx Text='<%#Eval("TotalDeductFee", "{0:c}")%>' HideIfZero='<%#Eval("TotalDeductFee")%>' runat="server" /></TD></TR>
<TR><TH colspan="10" style="TEXT-ALIGN: center"><HR></TH></TR>
<TR><TD nowrap>TOTAL FUNDS DISBURSED:</TD>
		<TD></TD>
		<TD colspan="1" align="right" valign="bottom"><B><%#Eval("CheckToDealer", "{0:c}")%></B></TD></TR>
<TR><TH colspan="10" style="TEXT-ALIGN: center"><HR></TH></TR>
</TABLE>
</CENTER>
<TABLE width="80%" align="center">
<TR valign="top"><TD nowrap width="1%">COMMENTS:</TD>
		<TD>		
		</TD></TR>
</TABLE>
</ItemTemplate></asp:FormView>
</center>
<DS:PurchaseContractsDataSource ID="dsDisb" SelectList="*,GETDATE() DocumentDate" runat="server">
<SelectParameters><asp:ControlParameter PropertyName="LoanID" Name="LoanID" Type="Int32" /></SelectParameters>
</DS:PurchaseContractsDataSource>
<DS:BorrowersDataSource ID="dsBorrower" runat="server">
<SelectParameters><asp:ControlParameter PropertyName="LoanID" Name="LoanID" Type="Int32" /></SelectParameters>
<SelectParameters><asp:Parameter Name="Position" DefaultValue="0" Type="Int32" /></SelectParameters>
</DS:BorrowersDataSource>
